#ifndef QLUASCRIPTCLASS_H
#define QLUASCRIPTCLASS_H

#include "qluascriptengine.h"

class QLuaScriptClassPrivate;

class QLuaScriptClass
{
public:
    QLuaScriptClass(QLuaScriptEngine * engine);
    virtual ~QLuaScriptClass();

    enum QueryFlag {
        HandlesReadAccess = 0x01,
        HandlesWriteAccess = 0x02,
        HandlesCallAccess = 0x04
    };
    Q_DECLARE_FLAGS(QueryFlags, QueryFlag)

    virtual QueryFlags queryProperty(const QLuaScriptValue& object,
                                     const QByteArray& name);
    virtual QLuaScriptValue property(const QLuaScriptValue& object,
                                          const QByteArray& name);
    virtual void setProperty(const QLuaScriptValue& object,
                             const QByteArray& name,
                             const QLuaScriptValue& value);
    virtual QLuaScriptValue prototype() const;
    virtual QString name() const;
    QLuaScriptEngine * scriptEngine() const;

private:
    Q_DISABLE_COPY(QLuaScriptClass)
    QLuaScriptClassPrivate * d;
};

Q_DECLARE_INTERFACE(QLuaScriptClass, "qtlua.QLuaScriptClass/1.0")

#endif // QLUASCRIPTCLASS_H
